{{define "Littlewin/categories.html"}}
<!DOCTYPE html>
<html>
<head>
    {{template "head/head" .}}
    {{template "head/3rdstatistic" .}}
</head>
<body>
{{template "Littlewin/header" .}}
<div class="fn__flex-1">
    <div class="wrapper fn__flex header__meta">
        <div id="pjax" class="main">
        {{if .pjax}}{{noescape "<!---- pjax {#pjax} start ---->"}}{{end}}
            {{template "Littlewin/nav" .}}
            <div class="module ft__center module--bottom module--space">
                <h2 class="module__logo">{{.I18n.Categories}}</h2>
                <span id="categoriesCount">0</span> <span class="ft__fade ft__13">{{.I18n.Categories2}}</span>
            </div>

            {{if eq (len .Categories) 0}}
            <div class="ft__center module module--space module--bottom">
                <br> <br>
                {{.I18n.NoData}}
                <br> <br>
            </div>
            {{end}}
            {{range .Categories}}
            <article class="article__item module module--bottom fn__flex">
                <header>
                    <time class="article__time">
                        <span class="article__day">{{.ArticleCount}}</span> {{$.I18n.space}}
                        <br>
                        {{$.I18n.article}}
                    </time>
                </header>
                <section class="fn__flex-1">
                    <h2 class="fn__flex-center">
                        <a class="article__title" rel="bookmark" href="{{.URL}}">
                            {{.Title}}
                        </a>
                    </h2>
                    <div class="vditor-reset article__abstract">
                        {{.Description}}
                    </div>
                    <footer class="article__footer fn__flex-center">
                        <svg>
                            <use xlink:href="#iconTag"></use>
                        </svg>
                        <span>
                            {{range .Tags}}
                            <a href="{{.URL}}" class="article__tag" rel="tag" >{{.Title}}</a>
                            {{end}}
                        </span>
                    </footer>
                </section>
            </article>
            {{end}}
        {{if .pjax}}{{noescape "<!---- pjax {#pjax} end ---->"}}{{end}}
        </div>
        {{template "Littlewin/side" .}}
    </div>
</div>
{{template "Littlewin/footer" .}}
{{if .pjax}}{{noescape "<!---- pjax {#pjax} start ---->"}}{{end}}
<script>
  increase({{len .Categories}}, 1000, 'categoriesCount', 0)
</script>
{{if .pjax}}{{noescape "<!---- pjax {#pjax} end ---->"}}{{end}}
</body>
</html>
{{end}}
